package com.mall.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.mall.entity.Area;
import com.mall.mapper.AreaMapper;
import com.mall.service.AreaService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 中国地区信息 服务实现类
 * </p>
 *
 * @author fire
 * @since 2020-04-16
 */
@Service
public class AreaServiceImpl extends ServiceImpl<AreaMapper, Area> implements AreaService {

    @Autowired
    private AreaMapper areaMapper;
    
    @Override
    public List<Area> getChildAddress(String superCode) {
        QueryWrapper<Area> wrapper = new QueryWrapper<>();
        wrapper.eq("CRI_SUPERIOR_CODE", superCode);
        return areaMapper.selectList(wrapper);
    }
}
